
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>home</title>
</head>
<script>
    $(function () {
        $.ajax({
            url: "/user/listDept",
            type: "post",
            data: "",
            dataType: "json",
            success: function (data) {
                var html = '<option value="-1">请选择</option>';
                for (var i = 0; i < data.length; i++) {
                    html += '<option value="' + data[i].id + '">' + data[i].name + '</option>';
                }
                $("#dept").append(html);
            }
        });
    });
</script>
<body>
<%@include file="/html/common/top.jsp"%>
<%@include file="/html/common/menu.jsp"%>
<div id="right">
    <form action="/user/add" method="post">

        姓名：<input name="username" type="text" value=""></br>

        邮箱：<input name="email" type="text"  >

        真实姓名：<input name="realName" type="text"  >

        部门：<select id="dept" name="deptId"></select>

        <input type="submit" value="保存">
    </form>

</div>

</body>
</html>
